﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Shell;
using EnvDTE;
using VSLangProj;
using Microsoft.VisualStudio;

namespace Sharp.UnusedReferences
{
	internal static class ConvertEx
	{
		public static IVsHierarchy ToIVsHierarchy(Project project)
		{
			IVsSolution solution = ServiceProvider.GlobalProvider.GetService(typeof(SVsSolution)) as IVsSolution;
			IVsHierarchy hierarchy;
			solution.GetProjectOfUniqueName(project.FullName, out hierarchy);
			return hierarchy;
		}
	}
}
